package com.atguigu.ssyx.activity.service;


import com.atguigu.ssyx.model.activity.ActivityInfo;
import com.atguigu.ssyx.model.activity.ActivityRule;
import com.atguigu.ssyx.model.order.CartInfo;
import com.atguigu.ssyx.model.product.SkuInfo;
import com.atguigu.ssyx.vo.activity.ActivityRuleVo;
import com.atguigu.ssyx.vo.order.CartInfoVo;
import com.atguigu.ssyx.vo.order.OrderConfirmVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 活动表 服务类
 * </p>
 *
 * @author atguigu
 * @since 2025-09-17
 */
public interface ActivityInfoService extends IService<ActivityInfo> {
    //获取活动列表

    IPage<ActivityInfo> selectPage(Page<ActivityInfo> pageparam);
    //获取活动规则数据
    Map<String, Object> findActivityRuleList(Long activityid);
    //在活动里面添加规则的数据
    void saveActivityRule(ActivityRuleVo activityRuleVo);
    //3.根据关键字来查询他匹配的sku信息
    List<SkuInfo> findSkuInfoByKeyword(String keyword);
//    根据skuId列表获取促销信息
    Map<Long, List<String>> findActivity(List<Long> skuIdList);
    //根据skuId列表获取促销数据和优惠卷数据
    Map<String, Object> findActivityAndCoupon(Long skuId, Long userId);
    //根据skuid获取到活动规则的数据
    List<ActivityRule> findActivityRuleListBySkuId(Long skuId);
    //获取购物车里面满足条件优惠卷和活动的信息
    OrderConfirmVo findCartActivityAndCoupon(List<CartInfo> cartInfoList, Long userId);
    //获取购物车对应规则数据
    List<CartInfoVo> findCartActivityList(List<CartInfo> cartInfoList);
}
